http://img215.imageshack.us/img215/6281/removems2.jpg
i've googled for it but haven't found yet..
i want the scrollbar to be removed when the program is open, i once found program that is able to do this.. i wonder how it's work?
http://img215.imageshack.us/img215/6281/removems2.jpg
i've googled for it but haven't found yet..
i want the scrollbar to be removed when the program is open, i once found program that is able to do this.. i wonder how it's work?
You'll probably have to make the console screen buffer the same size as the window - or resize the window so that it shows the entire screen buffer.
http://msdn2.microsoft.com/en-us/library/ms682073.aspx
gg
It will be difficult for you to do this in your program.
If you just want it to go away on your machine, then with the console open click on the icon in the top left of the window then scroll down and select Properties.
Switch to the Layout tab and under Screen Buffer Size change the Height to the same value as the Height under Window Size (probably 25). Then click OK. When it asks if you want to "Apply properties to current window only" or "Save properties for future windows with same title" then pick the second one and hit OK. This should remove the scrollbar from the console every time you run it for that particular program.
It is possible for you (I think), it just isn't that easy. Follow the link that Codeplug provided. Find a function that does what he said. Read about that function, maybe search for examples. If somebody has an example for you they might post it here, but in the meantime you can do some research starting with that link and you might find the answer.
This seems to work but I give no guarantees and take no responsibility.
However, if you are beginner you should concentrate more on learning the language and less on OS dependent things that add very little to the program. If you write something that is useful to you and others, few are likely to be annoyed by the scrollbars. And if you have learnt enough of the language, you'll be able to understand and use msdn references (or other 3rd party libraries) on your own.Code:#include <windows.h> void remove_scrollbar() { HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE); CONSOLE_SCREEN_BUFFER_INFO info; GetConsoleScreenBufferInfo(handle, &info); COORD new_size = { info.srWindow.Right - info.srWindow.Left + 1, info.srWindow.Bottom - info.srWindow.Top + 1 }; SetConsoleScreenBufferSize(handle, new_size); } int main() { remove_scrollbar(); }
Last edited by anon; 01-16-2008 at 02:47 PM.
I might be wrong.
Quoted more than 1000 times (I hope).Thank you, anon. You sure know how to recognize different types of trees from quite a long way away.
wow it's worked! thanks a lot!
i want to create game so i need to define some setting to the exe, i've already learn c++ for half year but never see some code like
so i don't know how to use it..Code:BOOL WINAPI GetConsoleScreenBufferInfo( __in HANDLE hConsoleOutput, __out PCONSOLE_SCREEN_BUFFER_INFO lpConsoleScreenBufferInfo );
thanks for the rest also..